The present invention relates to providing and maintaining national language support (NLS) messages for a computer program, allowing the program to be translated into other languages.
Most commercial program products sold to regions outside the United States must be translated to languages used in those regions. This usually means that certain national language-related matter is kept outside a program's source code, so that the matter is not compiled into the program's executable code. Otherwise, the program's executable code would have to be rebuilt and tested for each language. This matter typically includes text to be displayed when a program is run and file names for images and other iconage to be displayed when the program is run.
The national language-related matter is conventionally kept in files that are separate from the source code. This allows the text in the separate files to be translated independently of the source code. Within the realm of Java-based programs, this is typically done by employing simple text files loaded and maintained as resource bundles. Each text file includes keys and values, usually several of each. In this context, a key is a well-known name and a value is text corresponding to the key and that needs to be translated. When it is time for translation, resource bundle technology, which is built into Java technology, automatically selects an appropriate national language based on the current locale—defaulting to the English language if the language for that locale is unavailable.